<!-- 绑定微信确认弹窗 -->
<template>
	<view>
		<u-popup ref="popup" 
			v-model="show" 
			mode="center" 
			border-radius="14" 
			:mask-close-able="false" 
			closeable
			close-icon-size="40"
		>
			<view class="popup-wrap">
				<view class="title">提示</view>
				<view class="content">
					<view>确认授权当前登录微信</view>
					<view class="u-f-ajc">
						<image class="avatar" :src="userInfo.avatarUrl" mode="aspectFill"></image>
						<view class="name">{{userInfo.nickName}}</view>
					</view>
					<view>作为收款微信号吗？</view>
				</view>
				<view class="btn" >
					<button type="default" @tap="showSendPopup">确认</button>
				</view>
			</view>
		</u-popup>
	</view>
</template>

<script>
	export default {
		data(){
			return {
				show: false
			}
		},
		props:{
			userInfo:{
				type: Object,
				default: () => {},
			}
		},
		methods: {
			// 解密手机号
			showSendPopup(e) {
				this.close();
				this.$emit('confirmEvent');
			},
			open() {
				this.show = true;
			},
			close() {
				this.show = false;
			}
		}
	}
</script> 

<style lang="scss">
	.popup-wrap {
		width: 560rpx;
		height: 480rpx;
		display: flex;
		flex-direction: column;
		align-items: center;
		justify-content: space-around;
		padding: 10rpx 20rpx;
		
		.title {
			font-weight: bold;
			font-size: 40rpx;
		}
		
		.content {
			font-size: 32rpx;
			color: #999999;
			text-align: center;
			margin: 20rpx 0;
			
			.avatar {
				width: 80rpx;
				height: 80rpx;
				border-radius: 50%;
				margin: 10rpx 0;
				margin-right: 10rpx;
			}
			.name {
				max-width: 250rpx;
				overflow: hidden;
				white-space: nowrap;
				text-overflow: ellipsis;
			}
		}
		
		.btn {
			width: 100%;
			button {
				background-color: #323E56;
				color: #FFFFFF;
				text-align: center;
				font-size: 30rpx;
				line-height: 90rpx;
				border-radius: 16rpx;
			}
		}
	}
</style>
 